package com.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 服务器上传文件 - 请求参数配置
 * @author Howe Hsiang
 * @version 2.0
 * @date 2020-12-4 11:47
 */
@Component
public class UploadConfig {

    /**
     * Window路径
     */
    private static String filePathWindow;

    /**
     * Linux路径
     */
    private static String filePathLinux;

    /**
     * Linux路径
     */
    private static String filePathOss;
    
    private static String videoPathOss;


    /**
     * 文件URL
     */
    private static String fileUrl;


    public static String getFilePathWindow() {
        return filePathWindow;
    }

    @Value("${web.file-path-window}")
    public void setFilePathWindow(String filePathWindow) {
        UploadConfig.filePathWindow = filePathWindow;
    }

    public static String getFilePathLinux() {
        return filePathLinux;
    }

    @Value("${web.file-path-linux}")
    public void setFilePathLinux(String filePathLinux) {
        UploadConfig.filePathLinux = filePathLinux;
    }

    public static String getFileUrl() {
        return fileUrl;
    }

    @Value("${web.file-url}")
    public void setFileUrl(String fileUrl) {
        UploadConfig.fileUrl = fileUrl;
    }

    public static String getFilePathOss() {
        return filePathOss;
    }
    
    public static String getVideoPathOss() {
    	return videoPathOss;
    }

    @Value("${web.video-path-oss}")
    public void setVideoPathOss(String videoPathOss) {
        UploadConfig.videoPathOss = videoPathOss;
    }
}
